<div class="min-h-screen bg-gray-100 flex flex-col justify-center py-12 sm:px-6 lg:px-8">
    <div class="sm:mx-auto sm:w-full sm:max-w-md">
    <h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">
        用户登录
    </h2>
    </div>

    <div class="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
    <div class="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
        <%= if @flash["error"] do %>
        <div class="mb-4 bg-red-50 border border-red-200 text-red-700 px-4 py-3 rounded relative">
            <span class="block sm:inline"><%= @flash["error"] %></span>
        </div>
        <% end %>

        <%= if @flash["info"] do %>
        <div class="mb-4 bg-green-50 border border-green-200 text-green-700 px-4 py-3 rounded relative">
            <span class="block sm:inline"><%= @flash["info"] %></span>
        </div>
        <% end %>

        <.form for={%{}} action={~p"/login"} method="post" class="space-y-6">
        <div>
            <label for="user_account" class="block text-sm font-medium text-gray-700">
            账号
            </label>
            <div class="mt-1">
            <input
                id="user_account"
                name="user[account]"
                type="text"
                required
                class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md placeholder-gray-400 focus:outline-none focus:ring-brand focus:border-brand sm:text-sm"
                placeholder="请输入账号"
            />
            </div>
        </div>

        <div>
            <label for="user_password" class="block text-sm font-medium text-gray-700">
            密码
            </label>
            <div class="mt-1">
            <input
                id="user_password"
                name="user[password]"
                type="password"
                required
                class="appearance-none block w-full px-3 py-2 border border-gray-300 rounded-md placeholder-gray-400 focus:outline-none focus:ring-brand focus:border-brand sm:text-sm"
                placeholder="请输入密码"
            />
            </div>
        </div>

        <div class="flex items-center justify-between">
            <div class="text-sm">
            <a href={~p"/register"} class="font-medium text-brand hover:text-orange-500">
                还没有账号？立即注册
            </a>
            </div>
        </div>

        <div>
            <button
            type="submit"
            class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-brand hover:bg-orange-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand"
            >
            登录
            </button>
        </div>
        </.form>
    </div>
    </div>
</div>
